// Common.h
#import <Foundation/Foundation.h>

#define SOCKET_DATAGRAM_STYLE 1

#if defined (__arm__)
    #define PADDLE_STEP 0.75
#else
    #define PADDLE_STEP 0.6
#endif

#define PACKET_TAG @";;"

#define FPS 12.0f
#define ANIM_INTERVAL (1.0f/FPS)
#define MOVEMENT_MULTIPLIER 10.0f

#define DEBUG 1

//From Aaron hillegass
#define LogMethod() NSLog(@"-[%@ %s]", self, _cmd)

//Thanks Wil
//http://wilshipley.com/blog/2005/10/pimp-my-code-interlude-free-code.html
static inline BOOL IsEmpty(id thing) {
    return thing == nil
    || ([thing isEqual:[NSNull null]]) //JS addition
    || ([thing respondsToSelector:@selector(length)]
        && [(NSData *)thing length] == 0)
    || ([thing respondsToSelector:@selector(count)]
        && [(NSArray *)thing count] == 0);
}
